﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Avatar.Model;
using AvatarHelper;

namespace Avatar.Company
{
    public static class CompanyServiceManager
    {

        public static void Initialization(string _company)
        {
            using (var _adc = DBHelper.GetDataContext())
            {
                var _service = new CompanyService();

                _service.Company = _company;
                _service.ServiceTypeID = 1;

                _adc.CompanyService.InsertOnSubmit(_service);
                _adc.SubmitChanges();
            }
        }
        public static CompanyService GetServiceType(string _user)
        {
            using (var _adc = DBHelper.GetDataContext())
            {
                return _adc.CompanyService.FirstOrDefault(s => s.Company == _user);
            }
        }
    }
}
